package listbyorder.access101_200.test162;

/**
 * @author code_yc
 * @version 1.0
 * @date 2020/6/13 13:33
 */
public class Solution2 {

    // 300栈上面巨暴力的解法
    public int findPeakElement(int[] nums) {

        for (int i = 0; i < nums.length - 1; i++) {
            if (nums[i] > nums[i + 1]) {
                return i;
            }
        }
        return nums.length - 1;
    }

}
